package org.kevin.controller;

import org.springframework.security.access.method.P;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @ClassName: GradeController
 * @Description: TODO
 * @Author: kevinHan
 * @Date: 2019/8/25 15:35
 * @Version: 1.0
 */
@Controller
public class GradeController {

    /**
     * 欢迎页面
     * @return
     */
    @GetMapping("/")
    public String index() {
        return "welcome";
    }

    /**
     * 登陆页面
     * @return
     */
    @GetMapping("userlogin")
    public String login() {
        return "login";
    }

    /**
     * 一年级页面的映射
     * @param path
     * @return
     */
    @GetMapping("/grade1/{path}")
    public String grade1(@PathVariable("path") String path) {
        return "grade1/" + path;
    }

    /**
     * 二年级页面的映射
     * @param path
     * @return
     */
    @GetMapping("/grade2/{path}")
    public String grade2(@PathVariable("path") String path) {
        return "grade2/" + path;
    }

    /**
     * 三年级页面的映射
     * @param path
     * @return
     */
    @GetMapping("/grade3/{path}")
    public String grade3(@PathVariable("path") String path) {
        return "grade3/" + path;
    }
}
